package com.x.gzcrm.mapper;


import com.x.gzcrm.model.User;

import java.util.List;
import java.util.Map;


public interface UserMapper {

    public User findByUserName(String username);


    //以下两个方法用户于实现分页
    public int findCountByMap(Map<String, Object> map);

    public List<User> findListByMap(Map<String, Object> map);

    public void insert(User user);

    public void insertUserAndRole(Integer userId, Integer roleId);

    /**
     * 用户权限的批处理插入
     * @param userId
     * @param strroleIds  12345
     */
    public void insertUserAndRoleBatch(Integer userId, String strroleIds);


    public User findUserAndRolesByUserId(Integer userId);

    public void deleteUserRole(int userId);

    public void updateUser(User user);
}
